$(function () {
    $.menuSelector('#dishes_category');

    $('#dateRanger').daterangepicker({
    }, function (startDate, endDate) {
        var start = startDate.toString("yyyy-MM-dd");
        var end = endDate.toString("yyyy-MM-dd");
        //$('#dateRanger').val(start + " - " + end);
        $('#start').val(start);
        $('#end').val(end);
    });

    var $dt = Ifonly.DataTable({
        searching: false,
        c_filter: true,
        ordering: true,
        ajax: {
            url: g.ctx + '/dishes/category/dt'
        },
        "order": [
            [0, null] //第一列排序图标改为默认
        ],
        "columns": [
            Ifonly.DTKit.auto,
            {"data": "name"},
            {"data": "seq"},
            {"data": "create_time"},
            {
                "data": "id",
                "orderable": false,
                render: Ifonly.DTKit.render()
            }
        ]
    });
});